package com.xp.interview.service.impl;

import com.xp.interview.dao.NoteModelRepository;
import com.xp.interview.model.NoteModel;
import com.xp.interview.service.InsertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by xp on 15/10/15.
 */

@Service
public class InserServiceImpl implements InsertService{

    @Autowired
    private NoteModelRepository noteModelRepository;

    public void insertNote(String title,String content){
        NoteModel noteModel = new NoteModel(title,content);
        noteModelRepository.insert(noteModel);
    }
}
